﻿{include file=header.html}
<div class="conter">
  {include file="header.common.html"}
  <div class="layerbox_kuan"> 
  <form action="" method="post" id="form_box">
  <div class="layerbox">
  <table width="100%" class="table_fill">
    <tr>
      <th><em>*</em>转运类别：</th>
      <td>
      <select name="cangku" id="cangku" class="select_class">
      <option value="0">=请选择=</option>
      <!--{foreach from=$category item=list key=key}-->
      <option value="{$list.cate_name}" {if $choose_xiangmu.0 eq $list.cate_name}selected="selected"{/if}>{$list.cate_name}</option>
      <!--{/foreach}-->
      </select>        
      </td>
    </tr>
    <tr>
      <th><em>*</em>预约时间：</th>
      <td><input type="input" class="text width_normal" name="yuyueTime" id="yuyueTime" placeholder="预约取件的时间，格式：2016-04-18" maxlength="20"/></td>
    </tr>    
    <tr>
      <th><em>*</em>取货件数：</th>
      <td>
      <select name="qujianNumber" id="qujianNumber" class="select_class">
      <option selected="selected" value="0">=请选择=</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="更多">更多</option>
      </select>
      </td>
    </tr>
    <tr>
      <th><em>*</em>联系人：</th>
      <td><input type="input" class="text width_normal" name="lianxiren" id="lianxiren" value="{$member.real_name}" maxlength="20" placeholder="请填写联系人姓名"/></td>
    </tr>
    <tr>
      <th><em>*</em>联系人电话：</th>
      <td><input type="input" class="text width_normal" name="mobilphone" id="mobilphone" value="{$member.phone_mob}" maxlength="20" placeholder="请填写联系人电话"/></td>
    </tr>
    <tr>
      <th><em>*</em>联系人邮箱：</th>
      <td><input type="input" class="text width_normal" name="Email" id="Email"  value="{$member.email}" maxlength="30" placeholder="请填写邮箱地址"/></td>
    </tr>
    <tr>
      <th><em>*</em>国家/地区：</th>
      <td style="font-size:14px"><input name="txt_country" type="text" class="text" id="txt_country" style="width:70px;" value="{$order_info.txt_country}" maxlength="30" placeholder="国家/地区"/>&nbsp;
        省/州：<input name="txt_province" type="text" class="text" id="txt_province" style="width:70px;" value="{$order_info.txt_province}" maxlength="30" placeholder="省/州"/>&nbsp;
        城市：<input name="txt_city" type="text" class="text" id="txt_city" style="width:70px;" value="{$order_info.txt_city}" maxlength="30" placeholder="城市"/>&nbsp;
        </td>
    </tr>
    <tr>
      <th><em>*</em>详细地址：</th>
      <td><input name="address" type="text" class="text width_normal" id="address" maxlength="250" placeholder="请填写详细地址"/></td>
    </tr>      
    <tr>
      <th>邮编：</th>
      <td><input name="postoffice" type="text" class="text width_normal" id="postoffice" maxlength="20" onkeyup="clearNoNum(this)" />
      </td>
    </tr>         
    <tr>
      <th valign="top">备注：</th>
      <td><textarea name="notes" id="notes" class="text" placeholder="可以填写预约取件的备注说明">{$order_info.Memo}</textarea></td>
    </tr>
  </table>
  </div> 
  <p><input type="button" name="imgButton" class="button_css" value="确认提交" onclick="return Check_form();" />
      <!--{if $yubao_info.yubao_id}-->
      <input type="hidden" name="yubao_id"  value="{$order_info.yubao_id}"/><input type="hidden" name="act"  value="edit"/>
      <!--{else}-->
      <input type="hidden" name="act"  value="add"/>
      <!--{/if}--></p>
  </form>
  </div>
{include file=footer.html}
</div>
<div id="datePlugin"></div>
<script type="text/javascript">
var myDate = new Date();
$('#yuyueTime').date(myDate.getFullYear(),myDate.getFullYear());
//sumbit form
function Check_form() {
  if ($("#cangku").val() == "0") { alert("请选择转运类别");$("#cangku").focus(); return false; }
  if ($("#yuyueTime").val() == "") { alert("请选择预约时间");$("#yuyueTime").focus(); return false; }
  if ($("#qujianNumber").val() == "0") { alert("请选择取货件数");$("#qujianNumber").focus(); return false; }
  if ($("#lianxiren").val() == "") { alert("请输入联系人");$("#lianxiren").focus(); return false; }
  if ($("#mobilphone").val() == "") { 
      alert("请输入联系人电话");$("#mobilphone").focus(); return false; 
  }else{
	  var newstr = $("#mobilphone").val().replace(/\-/g, "");
	  if(/^[0-9\\-]*$/.test($("#mobilphone").val()) == false){ alert("手机/电话只能输入数字或者-横线，请正确输入");$("#mobilphone").focus(); return false; }
	  if(newstr.length < 10 || newstr.length > 13){ alert("您输入的寄件人手机/电话的格式有误，请输入10-13位的手机电话号码");$("#mobilphone").focus(); return false; }
  }
  if ($("#Email").val() == "") { 
      alert("请输入联系人邮箱");$("#Email").focus(); return false; 
  }else{
	  if( (/^(?:\w+\.?)*\w+@(?:\w+\.)*\w+$/.test($("#Email").val())) == false ){
		  alert("您输入的收件人邮箱地址格式有误，请正确输入");$("#Email").focus(); return false; 
	  } 	  
  }
  if ($("#txt_country").val() == "") {alert("请输入所在国家/地区");$("#txt_country").focus(); return false;}
  if ($("#txt_province").val() == "") {alert("请输入所在省/州");$("#txt_province").focus(); return false;}
  if ($("#txt_city").val() == "") {alert("请输入所在城市");$("#txt_city").focus(); return false;}
  if ($("#address").val() == "") {alert("请输入详细地址");$("#address").focus(); return false;}
  
  $("#form_box").submit();
}
</script>
</body>
</html>